package com.ziytek.web.citizen.configuration.db;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

/**
 * @author fengh
 */
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = DynamicMaxValidator.class)
public @interface DynamicMax {
    String message() default "值超出最大允许范围";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

    // 用于指定配置中的键（例如 maxAge）
    String configKey();
}